package com.boyi.center.controller.impl;

import java.net.Authenticator;


import com.boyi.center.controller.UserController;
import com.boyi.center.service.UserService;
import com.boyi.db.entity.User;
import com.boyi.shared.common.R;
import com.boyi.shared.common.Result;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 颜培轩
 * @date 2017年12月29日  0:04
 */
@RestController
@RequestMapping("user")
@Api(value = "用户信息管理模块接口->api", tags = {"API获取用户信息Controller"})
public class UserControllerImpl extends BaseControllerImpl<User> implements UserController {
    @Autowired
    private UserService userService;

    @PostMapping("test")
    public String test(User entity, String name) {
        return "success";
    }

    @GetMapping("arrat")
    public void arrat(String[] ids) {
        System.out.println("ids = " + ids);
    }

    @GetMapping("selectAllT")
    Result<List<User>> selectAll_1() {
        List<User> users = userService.selectAll_1();
        return R.ok(users);
    }
}
